<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html >
<html>
<head>
<title>系统登录</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- 引入jquery -->
<script type="text/javascript"
	src="${pageContext.request.contextPath}/resource/js/jquery-3.2.1.min.js"
	charset="utf-8"></script>
<!-- 引入bootstrap -->
<link
	href="${pageContext.request.contextPath}/resource/bootstrap-3.3.7/css/bootstrap-theme.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${pageContext.request.contextPath}/resource/bootstrap-3.3.7/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/resource/bootstrap-3.3.7/js/bootstrap.min.js"
	charset="utf-8"></script>


<style type="text/css">
body {
	background-color: #EEEEEE;
}

.con {
	padding: 20px; background-color : #fff;
	max-width: 570px;
	border-radius: 10px;
	background-color: #fff;
}

h1 {
	text-align: center;
	color: #4AA4B4;
}
h3{
color:red;
}
</style>
<!-- <link href="/resource/bootstrap-3.3.7/extends/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link href="/resource/bootstrap-3.3.7/extends/templatemo_style.css"
	rel="stylesheet" type="text/css"> -->
</head>
<body>
	<c:if test="${activeUser!=null and url!=null and url!='' }">
		<c:redirect url="${url }"></c:redirect>
	</c:if>
	<h1 class="margin-bottom-15">Login Form</h1>
	<br>
	<div class="container con">
		<div class="col-md-12">
			<h3>
				<c:out value="${error }"></c:out>
			</h3>

			<form class="form-horizontal" role="form"
				action="${pageContext.request.contextPath}/cacheTest/checkLogin.do"
				method="post">
				<div class="form-group">
					<label for="username" class="col-sm-2 control-label"><i
						class="glyphicon glyphicon-user"></i> </label>
					<div class="col-sm-10">
						<input type="text" class="form-control" id="username"
							placeholder="Username" name="username">
					</div>
				</div>
				<div class="form-group">
					<label for="password" class="col-sm-2 control-label"><i
						class="glyphicon glyphicon-lock"></i> </label>
					<div class="col-sm-10">
						<input name="password" type="password" class="form-control"
							id="password" placeholder="Password">
					</div>
				</div>
				<div class="form-group">
					<label for="randomcode" class="col-sm-2 control-label"> <i
						class="glyphicon glyphicon-barcode"></i>
					</label>
					<div class="col-sm-10">
						<input id="randomcode" name="randomcode" class="form-control"
							placeholder="Validatecode"> <br /> <img
							id="randomcode_img"
							src="${pageContext.request.contextPath }/validatecode.jsp"
							alt="点击刷新" width="100" height="30"
							onclick='refreshRandomCode(this)' />
					</div>
				</div>

				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<div class="checkbox">
							<label> <input type="checkbox" name="rememberMe">
								Remember me
							</label>
						</div>
					</div>
				</div>


				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-info">Log in</button>
						<!-- <input type="submit" value="Log in" class="btn btn-default"> -->
						<a href="forgot-password.html" class="text-right pull-right">Forgot
							password?</a>
					</div>

				</div>
				<hr>
				<div class="form-group">
					<div class="col-md-12">
						<label>Login with: </label>
						<div class="inline-block">
							<a href="#"><i class="fa fa-facebook-square login-with"></i></a>
							<a href="#"><i class="fa fa-twitter-square login-with"></i></a> <a
								href="#"><i class="fa fa-google-plus-square login-with"></i></a>
							<a href="#"><i class="fa fa-tumblr-square login-with"></i></a> <a
								href="#"><i class="fa fa-github-square login-with"></i></a>
						</div>
					</div>
				</div>
			</form>
			<div class="text-center">
				<a href="create-account.html" class="templatemo-create-new">Create
					new account <i class="fa fa-arrow-circle-o-right"></i>
				</a>
			</div>
		</div>
	</div>
	<h3>登录名为2，则可测试有权限（其他没有权限）进行用户的更新，多次点击更新,同时观察控制台，只有第一次查询数据库</h3>
	<h3>密码为111</h3>
</body>
</html>